I'm trying to sort a json list from another list. example:
jsonList = [{'id': 'das', 'name': 'something'}, {'id': 'rtn', 'name': 'Something Else'}, {'id': 'ddsn', 'name': 'Something ElseElse'}]
orderList = ['rtn', 'ddsn', 'das']
goodList = someFunction(jsonList, orderList )
I need the output to be the json list sorted by the id:
goodList = [{'id': 'rtn', 'name': 'Something Else'}, {'id': 'ddsn', 'name': 'Something ElseElse'}, {'id': 'das', 'name': 'something'}]