如果adminLock = 1
取中值“域”,怎么写
{
"code": 0,
"message": "成功",
"data": {
"recordCount": "128",
"pageSize": 100,
"page": 1,
"pageCount": 2,
"data": [
{
"domainsID": "173652434",
"nsGroupID": "199",
"groupID": "78987",
"domains": "xxx1.com",
"state": 3,
"userLock": 0,
"adminLock": 0,
"view_type": "1"
},
{
"domainsID": "173652434",
"nsGroupID": "199",
"groupID": "78987",
"domains": "xxx2.com",
"state": 3,
"userLock": 0,
"adminLock": 1,
"view_type": "1"
},
{
"domainsID": "173205836",
"nsGroupID": "199",
"groupID": "78987",
"domains": "xxx3.com",
"state": 3,
"userLock": 0,
"adminLock": 0,
"view_type": "1"
},
{
"domainsID": "173205812",
"nsGroupID": "199",
"groupID": "78987",
"domains": "xxx4.com",
"state": 3,
"userLock": 0,
"adminLock": 1,
"view_type": "1"
}
],
"nextPage": 2
}
}
我希望得到你的帮助,因为我真的很需要它,以及完整的爬行代码。我擅长使用Bash Shell,jq -r代码
我想把值xxx1.com,groupid组合成一个数组,我该怎么做想得到这样的结果
now_array=(["173652434"]="xxx2.com" ["173205812"]="xxx4.com")
我该怎么感谢你
1条答案
按热度按时间dluptydi1#
您可以使用以下代码选择内部数组的所有
domains
,其中adminLock == 1
:输出