1

From SQL, I generated my XML and it looks like this

<users>
    <user>user1</user>
</users>

Then I converted it to JSON and it looks like this,

"users": { "user": "user1" }

but I'm expecting a JSON to look like a single object array:

"users": [{ "user": "user1" }]
abhirathore2006
  • 3,317
  • 1
  • 25
  • 29
abirami
  • 25
  • 1

1 Answers1

0

Singe object array for JSON is basically the same as a single object.

There is a tricky way to overcome this, that is mentioned in this answer.


I would post this as a comment, but can't due to my privileges. Thank you for your understanding !

Sk83r1l4m4
  • 153
  • 11