Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:16:34+00:00 2026-06-14T21:16:34+00:00

I writing a node.js application using rethinkdb as a backend. To retrieve a json

  • 0

I writing a node.js application using rethinkdb as a backend.

To retrieve a json value you can use:

r.table('users').get(1).run()

That method call will return the full json document, there is however a method that allows you to specify the attributes to retrieve e.g:

r.table('users').get(1).pick('firstName', 'lastName').run()

I want to make use of this functionality and I have the attributes I want to ‘pick’ stored in an array. I can’t seem to figure out a way to convert this array to a parameter list for the .pick method.

Please advice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:16:35+00:00Added an answer on June 14, 2026 at 9:16 pm

    Just use the native apply method to directly pass the arguments array:

    r.table('users').get(1).pick.apply(this,yourArray).run()
    

    further reading

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing a chat application which will run on Heroku. I'm using Node.JS
A web app I am writing in JavaScript using node.js. I use Foreman, but
I am writing a Node.js application that relies on RabbitMQ. I'm using node-amqp as
I'm writing a node application and I would like to get the name of
I am writing a node js application. I am using request and cheerio to
I'm writing a backend for a mobile application using Heroku as my deployment solution
I'm writing a web application using node.js & express to provide a real-time aprs
After using node a lot, I had to get used to writing my code
I'm writing a function in node.js to query a PostgreSQL table. If the row
I am working on re-writing an existing web site using Node.js with Express. Front-end

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.