Skip to content

Latest commit

 

History

History
35 lines (29 loc) · 768 Bytes

get_field.md

File metadata and controls

35 lines (29 loc) · 768 Bytes
layout api-command
language JavaScript
permalink api/javascript/get_field/
command getField
io
sequence
sequence
singleSelection
value
object
value
related_commands
() (bracket) nth
bracket/
nth/

Command syntax

{% apibody %} sequence.getField(attr) → sequence singleSelection.getField(attr) → value object.getField(attr) → value {% endapibody %}

Description

Get a single field from an object. If called on a sequence, gets that field from every object in the sequence, skipping objects that lack it.

Example: What was Iron Man's first appearance in a comic?

r.table('marvel').get('IronMan').getField('firstAppearance').run(conn, callback)