JSON to CSV convertor where JSON has inconsistent columns in array

I am trying to convey JSON to CSV file where JSON columns in arrays are not consistent . Please find below sample JSON data I am trying to convert. {“data”:[{“country_id”:”001″,”countryinfolist”:”Elements”:[{ {“NAme”:”country”,”Value”:”USA”}, {“Name”:”capital”,”Value”:”DC”}, {“Name”:”Largest City”,”Value”=”NYC”}]}, “Demolist”:{“Demoid”:[{ “value”:”100000″,”name”:”POPOLATION”}, {“value”:”6000000″,”name”:”GDP”}, {“value”:”ENGLISH”,”name”:”Plang”}, {“value”:’SPANISH”,”name”:”Slang”}]}, {“country_id”:”002″,”countryinfolist”:”Elements”:[{ {“NAme”:”country”,”Value”:”Mexico”}, {“Name”:”Largest City”,”Value”=”Mexico City”}, {“NAme”:”Currency”,”Value”=’Peso”]}, “Demolist”:{“Demoid”:[{ “value”:”50000″,”name”:”POPOLATION”}, {“value”:”SPANISH”,”name”:”Plang”}, {“value”:”Soccer”,”name”:”Sports”}]} }]} As you can see array…

Details

Resize text area automatically to show all text on load without scrolling in Blazor

I am trying to resize text area automatically to show all text on load without scrolling in Blazor. <textarea class=”form-control” maxlength=”255″ style=”width:250px;” @bind=”Comment” id=”Comments” required></textarea> Code: @code { public string Comment = “This is test comments for textarea. This is test comments for textarea.”; } The following css i use but not working… textarea {…

Details

How to separate FireStore logic into own classes

I have this code public String getPoolValue() { final DocumentReference docRef = database.collection(“pool”).document(“bq2a7gLnz9bpEyIyQeNz”); docRef.get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() { @Override public void onSuccess(DocumentSnapshot documentSnapshot) { Pool pool = documentSnapshot.toObject(Pool.class); valueOfPool=String.valueOf(pool.getValue()); } }); return valueOfPool; } And what happens, is it goes through this code, returns valueOfPool right away without going through the onSuccess block and then goes through…

Details