Although that only "works" if the keys/elements are in the same order. It would also fail in any scenario where JSON.stringify() would fail - e.g., if the objects/arrays contain functions.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
As Vesa demonstrated, this only works on scalar values. The reason is pretty simple:
You could kinda sorta get around this using the old
JSON.stringify()
hack:Although that only "works" if the keys/elements are in the same order. It would also fail in any scenario where
JSON.stringify()
would fail - e.g., if the objects/arrays contain functions.