您好我有一个像下面的维生素A JSON数据格式,menrals,我需要合并单个阵列内的同一JSON按键阵列,合并相同的密钥JSON数据
[
{
Vitamins: [
"Please explain details about vitamins.",
"Vitamin is a vitamin.:P:D",
"7"
]
},
{
Vitamins: [
"i need more explanation about VitaminD. bcoz i'm new to medicine field ",
"i don't know the ans.. :P",
"7"
]
},
{
Minerals: [
"i need more info about Minerals!",
"Minerals are found in soils",
"8"
]
}
]
,但我需要改变,因为,请帮助如何合并它
[
{
Vitamins: [
{
"Please explain details about vitamins.",
"Vitamin is a vitamin.:P:D",
"7"
},
{
"i need more explanation about VitaminD. bcoz i'm new to medicine field ",
"i don't know the ans.. :P",
"7"
}
]
},
{
Minerals: [
"i need more info about Minerals!",
"Minerals are found in soils",
"8"
]
}
]
任何帮助表示感谢,提前致谢。
你有什么这么远吗?请张贴你已经试图解决它的代码。 –
你只需要格式化它的权利? –
是的Praveen,但这些是我动态获得,以防万一我可以有10组相同的密钥,我需要合并它 – ManoharSingh