When you do json.loads(x) the string (your message) is parsed into a dictionary, not sure what you're trying to do with json.loads(x[1]), but if you want the value of the first key of the dictionary you should go for json.loads(x)["UserId"]. Not sure if this is what you haven't understood.
Example:
import json
raw = """{
"UserId": "Xxx",
"Count": "0000"
}"""
print(type(raw))
print(raw)
parsed = json.loads(raw)
print(type(parsed))
print(parsed)
parsed_partial = json.loads(raw)["UserId"]
print(type(parsed_partial))
print(parsed_partial)
Output:
<class 'str'>
{
"UserId": "Xxx",
"Count": "0000"
}
<class 'dict'>
{'UserId': 'Xxx', 'Count': '0000'}
Xxx
For understanding map() read this.