my Jenkins response is like this below: I want to iterate through all the values in the data and do the comparison like this
data = {"fruits":["apple","banana","spinach","carrot"]}
for value in data.json().values():
if value[i] == apple or banana:
print value[i] # i want to print if its find one or two
elif value[i] == spinach or carrot:
print value[i] # i want to print if it is true
The code what i write is wrong but please help me out how to iterate through values and do the comparison and print the values if it exists am new to python
os.getenvevaluates to what you want then you can use anything. You might need to ask a new question or edit this question to clarify as it's getting off-topic and not very clear.