AnsweredAssumed Answered

Perform JDBC query on JSON

Question asked by vidhi.2112 on Aug 23, 2017
Latest reply on Sep 5, 2017 by Mark_HE

I want to perform CRUD operation on JSON file as an input.

As data structure we have JSON array with objects for each entry e.g. for roles:

[

  {

               "role_id":1,

              "role_alias":"globaladmin",

               "role_name":"Global Admin",

               "role_desc":"descr of global admin "

  },

  {

               "role_id":2,

              "role_alias":"localadmin",

               "role_name":"Local Admin",

               "role_desc":"descr of local admin "

  } 

]

 

I want to UPDATE the "roles" tables with above details so effected rows would be 2.

Lets say, for role_id :1, i want to update role_name, similarly for role_id:2.

Please provide inputs how i can iterate through json objects and update the database.

 

Regards

Vidhi Gupta

Outcomes