active_model_serializers icon indicating copy to clipboard operation
active_model_serializers copied to clipboard

Is there a way to display meta tag at first instead of root

Open karunakaranpt opened this issue 6 years ago • 1 comments

When I use like below

render json: users, root: "users", meta: {content: "10"}, meta_key: 'message', adapter: :json

I get response as

users: [
{
id: 1,
name: "John"
}
],
message: {
content: 10
}

Is there a way to display the message and then users as below?

message: {
content: 10
},
users: [
{
id: 1,
name: "John"
}
]

karunakaranpt avatar May 20 '19 11:05 karunakaranpt

@karunakaranpt don't you think both ways read as identical? btw I am not aware if we can do that.

wasifhossain avatar May 20 '19 23:05 wasifhossain