I have multiple nested JSON files that I need to combine into single CSV file using MATLAB

6 ビュー (過去 30 日間)
I need to combine 200 nested JSON files. Each JSON file consist of more than thousand data points. I am sharing here a sample of two data points each file contains to help in understanding how the data looks like. Let me know how can I achieve this task with MATLAB.
{"dataPointId":"0012bac3-f926-45ec-af61-af2e63a9ac0b","journeyId":"8ebce7ed0dac18983570c3b66bc931ac1ba094a8","capturedTimestamp":"2019-12-19T18:23:25.000-0600","location":{"latitude":45.275407,"longitude":-93.735603,"geohash":"cbj3df","postalCode":"55362","regionCode":"MN","countryCode":"US"},"metrics":{"speed":118.65,"heading":302.0},"vehicle":{"make":"CHEVROLET","model":"SILVERADO_HD","year":2016,"status":{"ignitionStatus":"MID_JOURNEY"}}}
{"dataPointId":"008c6966-35b0-4697-95ce-16b5f81e9c9d","journeyId":"4735c2b19fb44880e80b2052dc2f2f6a65b22a1f","capturedTimestamp":"2019-12-19T18:15:02.000-0600","location":{"latitude":45.295728,"longitude":-93.802924,"geohash":"cbj39m","postalCode":"55362","regionCode":"MN","countryCode":"US"},"metrics":{"speed":0.0,"heading":182.0},"vehicle":{"make":"CHEVROLET","model":"IMPALA","year":2016,"status":{"ignitionStatus":"MID_JOURNEY"}}}
  10 件のコメント
Salman Ahmad
Salman Ahmad 2021 年 8 月 12 日
This is the part where I am struggling the most i.e. developing a function/code to read all the files at the same time and combine their data in a tabular format. Because I don't have a coding background so that's where I thought MATLAB could give me some advance/easy options to get this job done otherwise I would have to spend alot of my time learning some programming languages that can reduce my effort.
Reeshabh Ranjan
Reeshabh Ranjan 2021 年 8 月 13 日
@Salman Ahmad see if this helps: https://in.mathworks.com/matlabcentral/answers/29837-processing-files-using-a-for-loop

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeJSON Format についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by