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

इश्क में ग़ैरत-ए-जज़्बात ने रोने ना दिया - सुदर्शन फ़ाकिर

 इश्क में ग़ैरत-ए-जज़्बात ने रोने ना दिया वरना क्या बात थी किस बात ने रोने ना दिया आप कहते थे कि रोने से ना बदलेंगे नसीब उमर भर आप की इस बात...