I'm trying to create json objects in swift with dictionaries, but the code is getting longer and longer. Is there any way to reduce the lines of for example this code? You can see that both dictionaries are the same except the "id" field If it's possible without using external libraries I'm trying to create json objects in swift with