Oct-09-2022, 07:22 AM
(Oct-09-2022, 06:25 AM)rob101 Wrote: To be 'literal', this will do what you've asked for...
print(f"amount: {data['_source']['amount']}, email: {data['_source']['email']}, mobile: {data['_source']['mobile']}, accountOwner: {data['_source']['accountOwner']}")... but my guess is that you don't want to be that literal.
Output:amount: 300, email: [email protected], mobile: 100000012457, accountOwner: Tom Hank
So, what's your search criteria?
NameError: name 'data' is not defined
f = open('df.json', 'r') content = f.read(f"amount: {data['_source']['amount']}, email: {data['_source']['email']}, mobile: {data['_source']['mobile']}, accountOwner: {data['_source']['accountOwner']}") print(content)