Convert Object to JSON String - Leetcode 2633 - JavaScript 30-Day Challenge

preview_player
Показать описание
Solving Day 18 of the Leetcode 30-day javascript challenge. Today we implement a JSON object parser, which is definitely useful info to know.

0:00 - Read the problem
1:40 - Parsing objects in JS
3:50 - Recursive Solution

leetcode 2633

#neetcode #leetcode #python
Рекомендации по теме
Комментарии
Автор

After yesterday's problem this one looks very approachable in solving, thanks for the video!

anirudhcodes
Автор

thank you neet code for video
we can also use
let newArr = object.map((item) => jsonStringify(item));
return `[${String(newArr)}]`

instead of join method🙂

rohitsingh-teiv
Автор

Thank you! But i think it's not necessary to use .join() method in this task, because arrays have realization of .toString() method which will have result with commas automatically in string context.

vnvozfm
Автор

Kind of leetcode to tag this as Medium.
Thank you for consistency!

Android-
Автор

Day 18 of doing the 30-day challenge with neetcode!!

vixguy