Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 345f6cd commit b29c5bcCopy full SHA for b29c5bc
README.md
@@ -431,3 +431,29 @@ console.log(globalThis) //get the global this depends on your environment
431
```
432
433
434
+
435
+# The second argument of JSON.stringify lets you cherry-pick 🍒 keys to serialize.
436
+```javascript
437
+const user = {
438
+ id: 459,
439
+ name: 'JS snippets',
440
+ age:29,
441
+ education:{
442
+ degree: 'Masters'
443
+ }
444
+}
445
446
+JSON.stringify(user,[name,age], 2)
447
448
+/*
449
+returns
450
451
+{
452
+ "name": "JS snippets",
453
+ "age": 29
454
455
456
457
+*/
458
459
+```
0 commit comments