When I try to use an arrow function with {} it seems to think it's an object and throw an error. I thought this is how arrow functions are generally defined?
The error given for the code below is TypeError: #<Object> is not a function
let allProperties = [];
sites.forEach(site => site.properties.forEach(p => {if (!allProperties.find(p)) allProperties.push(p)} ));
Edit: sites might be defined similarly to the following:
sites = [
{
"properties": [
{ "id": "111-11", "display": "Zone", "value": 1 },
]
}];
sites? Please post a snippet which can reproduce your error.