Use square bracket notation with a string:
var XXXValue = my_json['@type'];
The same can be used when you have a property name in a variable. Using your same example:
var propertyName="@type";
var XXXValue = my_json[propertyName];
More Related Contents:
- Convert JS object to JSON string
- How to read an external local JSON file in JavaScript?
- Post data to JsonP
- How to send JSON instead of a query string with $.ajax?
- Browser-native JSON support (window.JSON)
- Chrome sendrequest error: TypeError: Converting circular structure to JSON
- JavaScript associative array to JSON
- JSON.stringify doesn’t work with normal Javascript array
- Console.log showing only the updated version of the object printed
- How to convert raw javascript object to a dictionary?
- Adding a new array element to a JSON object
- How to search JSON tree with jQuery
- d3.json method doesn’t return my data array
- How to make a JSON call to an URL?
- Load local JSON file into variable
- sort object properties and JSON.stringify
- JSON left out Infinity and NaN; JSON status in ECMAScript?
- Javascript find json value [duplicate]
- Javascript group objects by property [closed]
- JavaScript data formatting/pretty printer
- Javascript Object push() function
- How to convert html table to excel with multiple sheet?
- Chrome and IE sorts JSON Object automatically, how to disable this?
- JSON.stringify output to div in pretty print way
- Is it possible to rename a key in the Firebase Realtime Database?
- Remove JSON element
- JSON.stringify converting Infinity to null
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- Updating a JSON object using Javascript
- How to get the total depth of an unknown JSON hierarchy?