I saved data in local I download it now but want to filter it before embedding it in repiters
Can’t find any function that filters a dataset that is not currently imported from WIX
Would appreciate help @yisrael-wix
This code does not work, all functions I found do not work in WIX
let muzarim = memory.getItem("data3")
var muzarim2 = JSON.parse(muzarim);
wixData.query(muzarim2)
.contains("mkt", $w('#mktinput').value)
.find()
.then((results )=>{
$w('#repeater1').data = results.items;
console.log(results);
});
The wixData.query() API only works on database collections. If you are trying to filter a JSON object, then you should do an Internet search for “JSON filtering” and find the method that works best for you.
@yisrael-wix
Thcxvanks!
Already I know, I found this example differently
https://stackoverflow.com/questions/23720988/how-to-filter-json-data-in-javascript-or-jquery
But it does not work in WIX any options I have found, I would love to help
Parsing a JSON object isn’t a Wix issue. Being able to filter a JSON object all depends on the structure of your JSON data object. You will need to do some research and figure out how to write the code to parse your data.