Ideally, I'd like to filter the list of virtual goods I get back when I call SparkPlayer.getVirtualGoods(), but it looks like that's not an option. Where do the tags get used, anyway?
Best Answer
C
Customer Support
said
over 6 years ago
Hey Rich,
You can get the tag from your VG list as you loop through them. They are an attribute of the VG.
var vGoods = config.getVirtualGoods();
var vGoodsTypeA = [];
for( var i = 0; i < vGoods.length; i++)
{
var tags = vGoods[i].tags;
if(tags.indexOf("A") > -1)
{
vGoodsTypeA.push(vGoods[i]);
}
}
You can get the tag from your VG list as you loop through them. They are an attribute of the VG.
var vGoods = config.getVirtualGoods();
var vGoodsTypeA = [];
for( var i = 0; i < vGoods.length; i++)
{
var tags = vGoods[i].tags;
if(tags.indexOf("A") > -1)
{
vGoodsTypeA.push(vGoods[i]);
}
}
Does that make sense?
Sean
R
Rich Joslin
said
over 6 years ago
Makes sense. I was hoping it could be used as a filter without pulling the whole collection first. I may submit a feature request, but it's no big deal. Thanks!
Rich Joslin
Ideally, I'd like to filter the list of virtual goods I get back when I call SparkPlayer.getVirtualGoods(), but it looks like that's not an option. Where do the tags get used, anyway?
Hey Rich,
You can get the tag from your VG list as you loop through them. They are an attribute of the VG.
Does that make sense?
Sean
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hey Rich,
You can get the tag from your VG list as you loop through them. They are an attribute of the VG.
Does that make sense?
Sean
Rich Joslin
Makes sense. I was hoping it could be used as a filter without pulling the whole collection first. I may submit a feature request, but it's no big deal. Thanks!
-
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