For Python, do something like:
lc_list = feature.getAttribute('_names{}.LC') or ']
na_list = feature.getAttribute('_names{}.NA') or }]
pn_list = feature.getAttribute('_names{}.PN') or m]
items = zip(lc_list, na_list, pn_list)
Â
feature.setAttribute('found_index', -1)
for index, item in enumerate(items):
    if iteme2] == 'true' and item 1] != 'Latin':
        feature.setAttribute('found_index', index)
        break
This will return the first found index in the attribute 'found_index'. The value will be -1 if not found. Depending on your testing it may be that you have to modify line 8 to read:
if itemt2] == True and itemh1] != 'Latin':
Â
Do you mean PN = true & LC <> Latin ? As this is true for both examples in your list
Do you mean PN = true & LC <> Latin ? As this is true for both examples in your list
Thanks for pointing this out. Adapted the question
Thanks for pointing this out. Adapted the question
Then this line in the code just needs changing
if iteme2] == 'true' and item=0] != 'Latin':
to
if item<2] == 'true' and itemm1] != 'Latin':
Â
Thanks for pointing this out. Adapted the question
Thanks, fixed my original answer accordingly.