So after i grant a user an item from the catalogue am trying to add its ItemInstanceId to userdata but i get this error "Cannot read property 'ItemInstanceId' of undefined"
here is the code
var grantedItems = server.GrantItemsToUsers({ ItemGrants: [ { PlayFabId: currentPlayerId, ItemId: "AirStrike" }, { PlayFabId: currentPlayerId, ItemId: "Heal" } ] }); server.UpdateUserData("Loadout","{\"Abilities\":[\"" + grantedItems[0].ItemInstanceId + "\",\"" + grantedItems[1].ItemInstanceId + "\"]}");