Sunday, May 22, 2022

Hash Table or Map or Dictionary or Objects (in JavaScript and JSON)

 In Python https://www.edureka.co/blog/hash-tables-and-hashmaps-in-python/#:~:text=Hash%20tables%20or%20has%20maps,and%20they%20can%20be%20changed.


JavaScript has a built in function for converting JSON strings into JavaScript objects:

JSON.parse()

JavaScript also has a built in function for converting an object into a JSON string:

JSON.stringify()

Example of a JSON string:

'{"name":"John", "age":30, "car":"Ford"}'


The JSON format is syntactically similar to the code for creating JavaScript objects. Because of this, a JavaScript program can easily convert JSON data into JavaScript objects.

Since the format is text only, JSON data can easily be sent between computers, and used by any programming language.

Read this for more details https://www.w3schools.com/js/js_json_intro.asp

No comments:

Post a Comment

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...