Difference between Javascript object and JSON

The javascript object and JSON have very similar syntax. Because of that, some peoples are confused about the difference between Js and JSON. Sample code segment to implement simple javascript object as below…

Js Object

In the Javascript object, you need to use names as variables such as without double-quotes. But the JSON format doesn`t like that. Sample JSON format code segment as below…

JSON

In the JSON you need to use names within double-quotes and that is the main difference between Js and JSON. The JSON format is language-independent. So that you can use that in any software development that you want.