jq --arg k1 "first" --arg v1 "32" --arg k2 "second" --arg v2 "32" --arg k3 "third" --arg v3 "33" '. | .[$k1]=$v1 | .[$k2]=$v2 | .[$k3]=$v3' <<<'{}' ;
{
"first": "32",
"second": "32",
"third": "33"
}
services:
webapp:
build: ./path
build:
context: .
dockerfile: Dockerfile
{
"profiles": {
"4b46f672d17a417dabccc2ee3e53a38d": {
"profile_id": "4b46f672d17a417dabccc2ee3e53a38d",
"cute_name": "Strawberry"
}
}
}
with open(input_file) as f:
dict = json.load(f)
print ('profile={},guid={},data={}'.format(profile,guid,dict[profile][guid]))
profile=profiles,guid=4b46f672d17a417dabccc2ee3e53a38d,data={u'cute_name': u'Strawberry', u'profile_id': u'4b46f672d17a417dabccc2ee3e53a38d'}
div[@class='myclass']//div[@style='mystyle']
или cssselector
div.myclass div[style='mystyle']