You need to unpack the JSON objects, add them together(see code), and then put them back into a new JSON object.
Code:
import json
d4=json.loads(payload4)
d5=json.loads(payload5)
d4["Values"].extend(d5["Values"])
newpayload=json.dumps(d4)
Output:
>>> print(newpayload)
{"Values": [{"Name": "projectionLength", "Attribute": "Test"}, {"Name": "projectionHeight", "Attribute": "Test"}, {"Name": "projectionLength", "Attribute": "Test5"}, {"Name": "projectionHeight", "Attribute": "Test6"}]}
Nicer looking version just to give you a feel of whats stored in newpayload(this is not the real JSON text):
>>> import pprint
>>> pprint.pprint(d4)
{'Values': [{'Attribute': 'Test', 'Name': 'projectionLength'},
{'Attribute': 'Test', 'Name': 'projectionHeight'},
{'Attribute': 'Test5', 'Name': 'projectionLength'},
{'Attribute': 'Test6', 'Name': 'projectionHeight'}]}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…