fixed bug in api

m-1 relations exported as array instead of object and keys were not
prettyfied