0

I have the following json structure:

{
    "data": [
        {
            "number": 123,
            "animal": "mush"
        },
        {
            "number": "123",
            "animal": ""
        }
    ],
    "animal_id": 1
}

How can I save it as a string?

1 Answers1

2

It varies by language, but in JavaScript (which might be likely used in your case), JSON.stringify does this job.

Zoltán Schmidt
  • 1,286
  • 2
  • 28
  • 48