Seeking a way of flattening a multidimensional nested QJsonValue containing all 6 basic data types (object, array, bool, double, String, Null).
Simple example for the purpose of understanding...Input:
{
"date": 1681693886,
"online": true,
"none": null,
"list": {
"arr": [
60,
100,
100,
100,
100,
100
],
"multiArr": [
["hi", "my", "name"],
["is", "unknown"],
[{"first": 0}, {"last": 100}]
],
"num": 60
}
}
And this should be the expected output:
key = "date", value = "1.68169e+09"
key = "list.arr.0", value = "60"
key = "list.arr.1", value = "100"
key = "list.arr.2", value = "100"
key = "list.arr.3", value = "100"
key = "list.arr.4", value = "100"
key = "list.arr.5", value = "100"
key = "list.multiArr.0.0", value = "hi"
key = "list.multiArr.0.1", value = "my"
key = "list.multiArr.0.2", value = "name"
key = "list.multiArr.1.0", value = "is"
key = "list.multiArr.1.1", value = "unknown"
key = "list.multiArr.2.0.first", value = "0"
key = "list.multiArr.2.1.last", value = "100"
key = "list.num", value = "60"
key = "none", value = "null"
key = "online", value = "true"