Try this...
intermediate_output = [
[
"Environment",
"ok"
],
[
"Memory",
"ok"
]
]
final_output = [[{"component": x[0], "status": x[1]}] for x in intermediate_output]
print(final_output)
Output :
[[{'component': 'Environment', 'status': 'ok'}], [{'component': 'Memory', 'status': 'ok'}]]
EDIT :
Now if you want list of all components, before you move forward, I'd suggest you strip your nested list and make it a plain list.
>>> striped_list = [list1[0] for list1 in final_output]
>>> striped_list
[{'component': 'Environment', 'status': 'ok'}, {'component': 'Memory', 'status': 'ok'}]
Now, use list comprehension...
>>> list_of_components = [item['component'] for item in striped_list]
>>> list_of_components
['Environment', 'Memory']
For status of a particular component, again you could use for loops or list comprehensions.
>>> my_component = "Environment" # we have to find status of this component
>>> my_component_status = [item['status'] for item in striped_list if item['component'] == my_component]
>>> my_component_status
['ok']
Excellent documentation for understanding list comprehension
https://www.pythonforbeginners.com/basics/list-comprehensions-in-python
Cheers!!