Cayle Cayle - 1 year ago 61
Javascript Question

What do these type values in brackets inside a js object mean?

vCard {
version: '4.0',
data: {
version: [String: '4.0'],
n: [String: 'Gump;Forrest;;;'],
fn: [String: 'Forrest Gump'],
org: [String: 'Bubba Gump Shrimp Co.'],
title: [String: 'Shrimp Man'],
photo: { [String: ''] mediatype: 'image/gif' },
tel: [
{ [String: 'tel:+11115551212'] type: [ 'work', 'voice' ], value: 'uri' },
{ [String: 'tel:+14045551212'] type: [ 'home', 'voice' ], value: 'uri' }
adr: [
{ [String: ';;100 Waters Edge;Baytown;LA;30314;United States of America']
type: 'work',
label: '"100 Waters Edge\\nBaytown, LA 30314\\nUnited States of America"' },
{ [String: ';;42 Plantation St.;Baytown;LA;30314;United States of America']
type: 'home',
label: '"42 Plantation St.\\nBaytown, LA 30314\\nUnited States ofAmerica"' }
email: [String: ''],
rev: [String: '20080424T195243Z']

I can't find any information on what the
[String: 'Gump;Forrest;;;']
means, how do I just access the value itself? Whenever I
it in node, I get

[String: 'Forrest Gump (Full Name)']

Answer Source

After reading the fine manual, I found that the way to get the value of the 'FN' property is:

let fullName = card.get('fn').valueOf();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download