Plucky Posted October 16, 2020 Posted October 16, 2020 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
comment Posted October 16, 2020 Posted October 16, 2020 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. 1
Recommended Posts
This topic is 1567 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now