중첩 JSON 관련 참고
- 붙여넣기
- 확인
JSON from APIs and the like often has a "nested" form, where data contains further data. Here are cautions for converting nested JSON to CSV with Convert CSV and JSON.
순서
- For "Direction", choose "JSON → CSV".
- Paste the JSON into "Before conversion".
- Press "Convert".
- Check "After conversion".
What nesting is
For example, data like this.
- Name: Yamada
- Address: (prefecture: Tokyo, city: Shinjuku)
Inside "Address" are further items. That is nesting.
The result after conversion
CSV is a flat table. Nested parts cannot take a table form, so their content goes into a single cell as text.
Ways to flatten
- Expand the items: bring the contents of the address out as separate items "prefecture" and "city".
- Fix with a text editor: change the structure with find-and-replace and so on.
- Extract just the needed parts: make JSON with only the target items.
How much to fix
- The values inside the nesting aren't needed → fine as it is
- You want to total the values inside the nesting in Excel → flatten before converting
Nested arrays (lists)
When one item holds several values (a list), it also goes into one cell as text. If you want rows split per list element, reshape first.
알맞은 경우
- Converting simply structured JSON (no nesting)
- When it is enough to see the nested contents as they are
예
Converted order data JSON. The "products" item held a list of products and went into one cell as text. To total per product, reshaped it to one row per product first and converted again.
Common stumbling blocks
- A cell is full of brackets and symbols: that is the nested part.
- The number of columns differs by row: data with uneven items.
Frequently asked questions
Can nesting be expanded automatically?
This tool does not expand nesting. Reshape first.
요약
Nesting goes into one cell as text. If you want to total it, flatten first.
“CSV와 JSON 변환” 사용하기 (무료)함께 쓰면 좋은 도구
- 중복된 줄 제거 및 목록 정렬: 중복된 줄을 제거하고 정렬합니다.
- ZIP 파일 만들기: 여러 파일을 하나의 ZIP으로 묶습니다.
- 글자 수 세기 (지원서·리포트용): 텍스트의 글자 수, 줄 수, 원고지 매수를 셉니다.