我想从带有lowdb的json文件中恢复一个值。我尝试了几种使用find和filter的方法,但是没有成功。
我的json文件与此类似:
{
"437581472976701696": [
{
"messageidofmainmessage": "584013718974957588"
},
{
"channelidofmainmessage": "583930963118516741"
},
{
"user_id": "209567566058753035",
"user_name": "kekedoe",
"stape": "1"
},
{
"user_id": "209567759058753074",
"user_name": "iekjjye",
"stape": "3"
}
],
"187581471043865280": [
{
"messageidofmainmessage": "784013717114957582"
},
{
"channelidofmainmessage": "783930964718516748"
},
{
"user_id": "209567566058753018",
"user_name": "egegeer",
"stape": "2"
},
{
"user_id": "509567759058753482",
"user_name": "dfgdge",
"stape": "4"
}
]
}
我想获取user_name字段的父级。例如,如果我问“ user_name”的父母:“ egegeer”,他还给我“ 187581471043865280”