In Javascript, two strings are equal ===
if they have the same data.
Ex: '{"light":true,"new":true,"available":false}' === '{"light":true,"new":true,"available":false}'
Note: In other languages like Java, two strings are equal ==
is they refer to the same instance. In that case, two strings with same data would not be ==
.
1
solved JSON.stringify and angular.toJson not working as expected