Arsilex Posted August 12, 2013 Share Posted August 12, 2013 Well took a while trying to see how it turned the table completely out of a json but I can not do anything ... maleter = fromJSON(data.maletero) maleteros[data.vehicleID] = {maleter[1], maleter[2], maleter[3], maleter[4]} outputDebugString(maleter[1]) but always gives me nil: S and do not understand that: S this is the JSON [ { "5": [ "15", "3", "59", "12" ] } ] I have formed the JSON like this: test = toJSON( { [vehID] = {arma1, ammo1, arma2, ammo2} } ) PD: Sorry for me bad english Link to comment
Vector Posted August 12, 2013 Share Posted August 12, 2013 -> outputDebugString(maleter["1"]); o outputDebugString(maleter[tostring(1)]); "Note: Indices of a JSON object such as "1": "cat" are being returned as string, not as integer." Link to comment
Arsilex Posted August 13, 2013 Author Share Posted August 13, 2013 ->outputDebugString(maleter["1"]); o outputDebugString(maleter[tostring(1)]); "Note: Indices of a JSON object such as "1": "cat" are being returned as string, not as integer." thx you works fine Link to comment
Recommended Posts
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