I get two different results for
json_encode([ 'name' => 'xxx❤xxx' ]);
--> {"name":"xxx\u2764xxx"}
JSON.stringify({ name: 'xxx❤xxx');
--> {"name":"xxx❤xxx"}
Why is that and how can I make sure that the js version produces the same result as the php version?