Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get result as map #2009

Open
LiamKrenn opened this issue Jun 13, 2024 · 1 comment
Open

Get result as map #2009

LiamKrenn opened this issue Jun 13, 2024 · 1 comment

Comments

@LiamKrenn
Copy link

LiamKrenn commented Jun 13, 2024

I use an inbound primary key "id". How can I get a result as a map (instead of an array), with the id as key and the value as the value (with or without the id)

So instead of:

[{
id: 0,
name: "John"
age: 34
}, ...]

Like this:

{
0: {name: "John", age: 34},
1: {...}
}

I have to fetch thousands of values, so I'm unsure of how efficient it would be to manually manipulate the data

@kotasudhakar
Copy link

This would be really helpful feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants