Selection

1 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$49.99
List Price:  $69.99
You save:  $20
€42.93
List Price:  €60.10
You save:  €17.17
£37.46
List Price:  £52.44
You save:  £14.98
CA$69.12
List Price:  CA$96.78
You save:  CA$27.65
A$75.26
List Price:  A$105.37
You save:  A$30.11
S$64.76
List Price:  S$90.67
You save:  S$25.91
HK$389.16
List Price:  HK$544.86
You save:  HK$155.69
CHF 40.18
List Price:  CHF 56.26
You save:  CHF 16.07
NOK kr505.23
List Price:  NOK kr707.37
You save:  NOK kr202.13
DKK kr320.68
List Price:  DKK kr448.97
You save:  DKK kr128.29
NZ$86.53
List Price:  NZ$121.15
You save:  NZ$34.62
د.إ183.58
List Price:  د.إ257.03
You save:  د.إ73.45
৳6,116.06
List Price:  ৳8,562.98
You save:  ৳2,446.91
₹4,497.02
List Price:  ₹6,296.19
You save:  ₹1,799.17
RM205.50
List Price:  RM287.72
You save:  RM82.22
₦72,526.70
List Price:  ₦101,543.19
You save:  ₦29,016.48
₨14,014.55
List Price:  ₨19,621.49
You save:  ₨5,606.94
฿1,592.73
List Price:  ฿2,229.95
You save:  ฿637.22
₺2,125.87
List Price:  ₺2,976.39
You save:  ₺850.52
B$271.91
List Price:  B$380.70
You save:  B$108.78
R846.14
List Price:  R1,184.67
You save:  R338.52
Лв83.98
List Price:  Лв117.58
You save:  Лв33.60
₩73,675.26
List Price:  ₩103,151.26
You save:  ₩29,476
₪161.74
List Price:  ₪226.45
You save:  ₪64.71
₱2,947.66
List Price:  ₱4,126.96
You save:  ₱1,179.30
¥7,766.44
List Price:  ¥10,873.64
You save:  ¥3,107.20
MX$908.54
List Price:  MX$1,272.04
You save:  MX$363.49
QR182.21
List Price:  QR255.11
You save:  QR72.89
P664.14
List Price:  P929.85
You save:  P265.71
KSh6,466.31
List Price:  KSh9,053.35
You save:  KSh2,587.04
E£2,373.62
List Price:  E£3,323.27
You save:  E£949.64
ብር7,753.82
List Price:  ብር10,855.98
You save:  ብር3,102.15
Kz45,840.83
List Price:  Kz64,180.83
You save:  Kz18,340
CLP$46,084.78
List Price:  CLP$64,522.38
You save:  CLP$18,437.60
CN¥353.43
List Price:  CN¥494.83
You save:  CN¥141.40
RD$3,201.94
List Price:  RD$4,482.97
You save:  RD$1,281.03
DA6,487.24
List Price:  DA9,082.66
You save:  DA2,595.41
FJ$112.99
List Price:  FJ$158.20
You save:  FJ$45.20
Q382.91
List Price:  Q536.11
You save:  Q153.19
GY$10,458.56
List Price:  GY$14,642.82
You save:  GY$4,184.26
ISK kr6,395.49
List Price:  ISK kr8,954.20
You save:  ISK kr2,558.70
DH461.70
List Price:  DH646.42
You save:  DH184.71
L850.55
List Price:  L1,190.84
You save:  L340.29
ден2,645.65
List Price:  ден3,704.12
You save:  ден1,058.47
MOP$400.86
List Price:  MOP$561.24
You save:  MOP$160.37
N$847.22
List Price:  N$1,186.17
You save:  N$338.95
C$1,839.66
List Price:  C$2,575.68
You save:  C$736.01
रु7,191.23
List Price:  रु10,068.30
You save:  रु2,877.06
S/168.03
List Price:  S/235.26
You save:  S/67.22
K212.12
List Price:  K296.99
You save:  K84.86
SAR187.61
List Price:  SAR262.67
You save:  SAR75.05
ZK1,155.73
List Price:  ZK1,618.12
You save:  ZK462.38
L218.58
List Price:  L306.03
You save:  L87.45
Kč1,038.96
List Price:  Kč1,454.63
You save:  Kč415.67
Ft16,243.25
List Price:  Ft22,741.85
You save:  Ft6,498.60
SEK kr469.93
List Price:  SEK kr657.94
You save:  SEK kr188.01
ARS$71,553.30
List Price:  ARS$100,180.35
You save:  ARS$28,627.04
Bs345.44
List Price:  Bs483.64
You save:  Bs138.20
COP$189,920.36
List Price:  COP$265,903.70
You save:  COP$75,983.34
₡24,418.74
List Price:  ₡34,188.19
You save:  ₡9,769.45
L1,316.61
List Price:  L1,843.36
You save:  L526.75
₲343,808.75
List Price:  ₲481,359.76
You save:  ₲137,551.01
$U1,953.05
List Price:  $U2,734.43
You save:  $U781.37
zł181.59
List Price:  zł254.25
You save:  zł72.65
Already have an account? Log In

Transcript

Now that we have seen prediction, let's see how to use selection. Now the concept is the same thing, you have to specify an object representing conditions. For example, if I want to get all the content from city of Chicago, so I can do the same thing like DB dot contacts dot find. And the first argument would be the selection. And the second argument would be the projection. Let's say for example, I don't want to include the ID, I can simply say ID is zero.

However, we want to specify a condition here. And that condition would be city in Chicago, and save it. And let's go and run the same thing. Mongo x 04 dot js, you can see that we got some records now just to make sure that we see the data properly. That's also called the predict function, save it and re execute the same command. And this time, you can see we got some documents where the city property equals to Chicago, giving a key value pairs like this is equal and of saying city equals to Chicago.

So the same thing can also be represented using city. And then we specify an operator, which is given in the form of another object. So dollar EQ, and then we give Chicago. So now we are saying that city equals to Chicago. So output should remain the same thing. And we got the same thing.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.