Found a hacky way to sort the json problem. Will approach it properly tomorrow...