0
I am displaying data that is brought from the database in some Dropdowns, as if it were a kind of website shopping cart page E-commerce, at the moment my page is like this:
But I need to store this in a list each time the user clicks the button Add, I am developing in a tool called Bonitasoft, which is geared towards the development of software systems automation, I wonder if it is possible to store this list of item in JSON, so then can display to the user in a table everything that is in this list in a table.
If you have an example of how to save a list in JSON and how to bring the contents of that list into a table would be perfect.
Is that your question? https://www.w3schools.com/JS/js_json_arrays.asp
– Pagotti
@Pagotti It’s kind of what I want, but would you know how to add these items to JSON? For in the examples shown in the link are inserted the items manually
– R.Santos
Do you already have a JSON and want to change it? If that’s it, it complements your question with the code you’ve already done and then it’s easier to understand how to help.
– Pagotti
I don’t have JSON @Pagotti yet, I can save the content that comes from the database when the user selects, in a temporary variable, so I need to know how to add the content of a variable to JSON
– R.Santos
I think I understand, so put this Javascript code that you take the variable that comes from the database and a part of the HTML that has the form and complements the question, otherwise the way is to follow the generic example of that site.
– Pagotti
This is the problem @Pagotti, this IDE (Bonitasoft) it does not have the HTML code, I can create the pages just by dragging the fields (inputs, dropdowns, etc) to the screen, And to bring the content of the bank I use API Rest to load the content on the screen, example of API Rest: .. /API/bdm/businessData/com.company.model.Clientpostgresql? q=findByNomeEmpresa&p=0&c=10000&f=usergroup={processVariable.value}}
– R.Santos