It is possible to store a list in JSON file

Asked

Viewed 253 times

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:

inserir a descrição da imagem aqui

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 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

  • 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.

  • 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

  • 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.

  • 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}}

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.