This would depend how you're sending this data to the client, and which sdk you're using. For example, if you're sending it to the client using Spark.setScriptData("ucdt", ucdt);, and using our Unity SDK, you could retrieve it client side using:
var ucdt = response.ScriptData.GetGSDataList("ucdt"); //this will retrieve the array of objects
var el = ucdt[0]; //to get a specific element from your array
var cn = el.GetString("cn"); //to get the 'cn' from the array element
var clv = el.GetIntList("clv"); //to get the 'clv' array from the array element
This would depend how you're sending this data to the client, and which sdk you're using. For example, if you're sending it to the client using Spark.setScriptData("ucdt", ucdt);, and using our Unity SDK, you could retrieve it client side using:
var ucdt = response.ScriptData.GetGSDataList("ucdt"); //this will retrieve the array of objects
var el = ucdt[0]; //to get a specific element from your array
var cn = el.GetString("cn"); //to get the 'cn' from the array element
var clv = el.GetIntList("clv"); //to get the 'clv' array from the array element
Regards,
Vinnie
H
Hu~u Ða?o
said
almost 5 years ago
Thank for the support team,
In that case, your response is correct.
Now i have new issue
Attempt i got this Json:
{
"b": [
[
"long nhan",
"tay trong",
"hanh hung",
"cao tu",
"tu tung"
]
]
}
How can i get that Array? When i used GetGSdataList("b")
But that Array count = 0
I dont know how to get list string or ... without key.
Hu~u Ða?o
Hi community, attempt i got this json
var ucdt = {ucdt : [{cn:'Joe', clv:[1, 3, 2, 1, 1, 2, 1, 3, 3]}, {cn:'Adam', clv:[1, 3, 2, 1, 1, 2, 1, 3, 3]},
{cn:'Lim', clv:[1, 3, 2, 1, 1, 2, 1, 3, 3]}, {cn:'Def', clv:[1, 3, 2, 1, 1, 2, 1, 3, 3]}, {cn:'Bull', clv:[1, 3, 2, 1, 1, 2, 1, 3, 3]}]};
I'm done in sending to the client, but i dont know how to get this data? pls tell me
Hi Hu~u Ða?o,
This would depend how you're sending this data to the client, and which sdk you're using. For example, if you're sending it to the client using Spark.setScriptData("ucdt", ucdt);, and using our Unity SDK, you could retrieve it client side using:
var ucdt = response.ScriptData.GetGSDataList("ucdt"); //this will retrieve the array of objects
var el = ucdt[0]; //to get a specific element from your array
var cn = el.GetString("cn"); //to get the 'cn' from the array element
var clv = el.GetIntList("clv"); //to get the 'clv' array from the array element
Regards,
Vinnie
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Hu~u Ða?o,
This would depend how you're sending this data to the client, and which sdk you're using. For example, if you're sending it to the client using Spark.setScriptData("ucdt", ucdt);, and using our Unity SDK, you could retrieve it client side using:
var ucdt = response.ScriptData.GetGSDataList("ucdt"); //this will retrieve the array of objects
var el = ucdt[0]; //to get a specific element from your array
var cn = el.GetString("cn"); //to get the 'cn' from the array element
var clv = el.GetIntList("clv"); //to get the 'clv' array from the array element
Regards,
Vinnie
Hu~u Ða?o
Thank for the support team,
In that case, your response is correct.
Now i have new issue
Attempt i got this Json:
{
"b": [
[
"long nhan",
"tay trong",
"hanh hung",
"cao tu",
"tu tung"
]
]
}
How can i get that Array? When i used GetGSdataList("b")
But that Array count = 0
I dont know how to get list string or ... without key.
pls support me, thank you
Hu~u Ða?o
let say i have json like this
array: [[array], [array]...], [[array], [array], [array]...]
How can i get my data?
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics