October 16, 20205 yr Hi Im just started to implement some javascript charts into my Filemaker db and I've run into an issue with an array. My loader script creates the 3 x variables. The $sales variable looks like it's working for each individual record as it loops through ( {"month":December","sales":"777"} but the $data variable cannot create the Array. It displays in the debugger as [[],[],[],[],[],[],[],[],[],[],[],[]]. I think it should look like this: [{"month":December","sales":"777"},{"month":November","sales":"256"}]. Any help on this would be much appreciated as I'm pulling my hair out.. Graph.fmp12
October 16, 20205 yr I only glanced at this, but I believe that instead of: JSONSetElement ( $data ; [ $counter ; $sales ; JSONArray ] ) you should have: JSONSetElement ( $data ; $counter ; $sales ; JSONObject ) -- I am not sure if it makes a difference, but it seems to me that "sales" should be set as JSONNumber, rather than JSONString.
Create an account or sign in to comment