Since you’re referencing the property via a variable, you need the bracket notation.
var gda_set = gdas[mode];
…which is the same notation you would use if you were passing a String.
var gda_set = gdas["f"];
More Related Contents:
- Convert JS object to JSON string
- 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
- Serializing object that contains cyclic object value
- 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?
- How do I persist a ES6 Map in localstorage (or elsewhere)?
- sort object properties and JSON.stringify
- get size of JSON object
- Javascript find json value [duplicate]
- How can I open a JSON file in JavaScript without jQuery?
- JavaScript data formatting/pretty printer
- Javascript Object push() function
- How to convert html table to excel with multiple sheet?
- AJAX call and clean JSON but Syntax Error: missing ; before statement
- JavaScript: How can I generate formatted easy-to-read JSON straight from an object? [duplicate]
- Remove JSON element
- Remove key-value pair from JSON object
- How to restore original object/type from JSON?
- Cross-Origin resource sharing and file://
- sending data as JSON object from Python to Javascript with Jinja [duplicate]
- Process a continuous stream of JSON
- Push JSON Objects to array in localStorage