Hi. I'm trying to change the role of multiple roles (users) in my query at once. I'm having two problems.
The first is mapping the rows by their primary key (i.e. ID). It doesn't seem to be returning an array but the formatDataAsArray method didn't work either.
The second is figuring out how to either loop through the array of primary keys or use them all to update every row based on it. I'm attaching a screenshot of where I'm at now.
I don’t think that you can assign variables in the inline brackets like that. Since you’re already creating an array with the map function, just use that directly.