Within my Ionic app, there exists a specific page where users have the ability to modify information related to a particular city. What I aim to achieve is for these modifications to only be visible to other users who are also located within the same "City" as the most recent user who made changes.
To illustrate this concept further, suppose User 1 resides in Chicago and updates some details. User 2, who is also situated in Chicago, should see those updates. However, User 3, residing in New York City, should not witness the changes.
Unfortunately, my current implementation is encountering an error that states, "TypeError: Attempted to assign to readonly property."
The following excerpt showcases a snippet of my .ts code:
let user = Parse.User.current().attributes;
if (user.city = lastEditor.attributes.city) { // this is where the error is
query.equalTo('objectId', this.selectedCity.objectId);
query.first((results) => {
results.set("city",city);
results.set("state",state);
.
.
.
etc.
It's worth noting that I'm utilizing Safari as my browser, however, I encountered the same error while testing this on Google Chrome.