Hello I am trying to filter and return a new array with the objects filtered from 2 seperate arrays. the results are from read only data but i dont believe when i parse them they are an actual Array
var QuestsThatCanBeGiven = TitleQuests.filter(val => !PlayerQuests.includes(val));
basically i am trying to assign quests that haven been already assigned that exist in the title data - titlequest - and compare that to playerquests to make sure it doesnt exist in there - and itll have an array of the titlequests so that i can iterate through them later
the title quests result is retrieve via
var TitleQuests = JSON.parse( TitleQuestsResult.Data["TitleQuests"]);
this does result to an OBJECT OBJECT which i am guessing is the issue - is there an easy way to get this made into an array since the data is pretty much
TitleQuests: { Quest1: { Questname: "bar" Reward: "salad" }, Quest2: { Questname: "brrrr" Reward: "cad" } }
I tried adding [ and ] to the beginning and end respectively to see if that would parse it into an Array of Objects.
have any suggestions or examples that i could go about checking?
the only thing i can think of is iterate through them right now with a for loop add each object to an array then filter.
thanks!