How to convert JSON Array in JSON Object -


I have a JSON array in the format below which I want to convert to JSNA object (key, value) pair. Since I'm new to Jason, I do not know how to get it. ["Ajit", "Amol", "Kiran"], "Penis": ["100", "101", "102"], "Name": [ I want to convert to the above format such as "name": "100", "name": "Ajit" ["male", "male", "male"]}

{"Id": "102", "name"}, {"id": "101", "name": "male"}, "gender": "male"}, {"id" : "Kiran", "Gender": "Male"}]

Can you share your valuable ideas for doing this thing?

This works for example, assuming a lot of things, var arrayoff objects = [];

  / ** * The ultimate object oz formated like the first one, / var i = 0, arrayOfObjects = []; For (prop in OBG) {if (for instance, PRO example) {for (i = 0; i & lt; obj [prop] .length; ++ i) {if (typeof arrayOfObjects [i]! == undefined ) {ArrayOfObjects [I] [Sahara] = Obje [prop] [i]; } And {var newObj = {}; NewObj [c] = obj [prop] [i]; ArrayOfObjects.push (newObj); }}}}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -