It's impossible to use a literal dot in a JSON key with FileMaker's JSON parsing functions.
To get the index from a JSON object with value with JavaScript, we can use the array findIndex method.
To access the JSON object in JavaScript, parse it with JSON. parse() , and access it via “.” or “[]”.
JSON SyntaxJSON defines only two data structures: objects and arrays. An object is a set of name-value pairs, and an array is a list of values. JSON defines seven value types: string, number, object, array, true, false, and null.
What you want is:
var smth = mydata.list[0]["points.bean.pointsBase"][0].time;
In JavaScript, any field you can access using the . operator, you can access using [] with a string version of the field name.
in javascript, object properties can be accessed with . operator or with associative array indexing using []. ie. object.property
is equivalent to object["property"]
this should do the trick
var smth = mydata.list[0]["points.bean.pointsBase"][0].time;
Try ["points.bean.pointsBase"]
If json object key/name contains dot......! like
var myJson = {"my.name":"vikas","my.age":27}
Than you can access like
myJson["my.name"]
myJson["my.age"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With