inputdata:

I want to change all keys are in same:-
like 0,1,2, keys are changed to $id for all how to fix this ..suggest .
inputdata:
I want to change all keys are in same:-
like 0,1,2, keys are changed to $id for all how to fix this ..suggest .
Best answer by Bikram
Please try the below ode snippet and let. me know if it. helps.
import json
for record in sdc.records:
try:
data_dict = json.loads(record.value['assigned_to'])
#s1 = #fun(data_dict)
s1 = [{"id":val} for val in data_dict.values()]
record.value['data1'] = json.dumps(s1)
# Write record to processor output
sdc.output.write(record) except Exception as e:
# Send record to error
sdc.error.write(record, str(e))
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.