JSON vs Object: what are the differences for Wix?

Hi,

I’ve made these tests below:

  1. In my page code:
    const test = {
    key1: 1,
    key2: “value”
    }
    const test2 = {
    “key1”: 1,
    “key2”: “value”
    }

    console.log(“Object:”)
    console.log(test)
    console.log(“JSON:”)
    console.log(test2)
    console.log(“JSON:”)
    console.log(JSON.stringify(test))

and got these results below;


1st question: what are the differences between an regular object and a JSON for Wix?


Then a ran same code from backend and got these results:


2nd question: Why did the printed result change?

3rd question: What are the differences now?

Thanks in advance for any help. I’m having trouble connecting to a 3rd party due to an unrecognized body (and I’m wondering if it is not because something in my JSON).

Hi Ricardo,
JavaScript and JSON objects works the same in wix as they do in javascript
I would recommend checking the same printed values in your browser inspector and see if there any changes.
also, you can use to check this site as well to learn more about JSON objects

Good Luck!