You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<%*
let json = {{json}}
let firstName = json.firstName
let emails = json.emails.join("\n")
let relations = json.relations.map(({person, type}) => `${firstName} is a ${type || ''} relation to ${person}`).join("\n")
-%>
my contact's first name is <% firstName %>
emails:
<% emails %>
relations:
<% relations %>
date: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>
<% tp.file.cursor() %>
I get the following output (some data redacted):
<%*
let json = {
"accountSource": "**@**.com",
"resourceName": "people/**",
"displayNameLastFirst": "**, **",
"firstName": "**",
"lastName": "**",
"middleName": "",
"type": "CONTACTS",
"emails": [
"**@**.com",
"**@gmail.com",
"**@**.dev",
"**@**.com",
"**@gmail.com",
"**@**.dev"
],
"phones": [],
"birthdays": [],
"relations": [],
"userDefinedData": [],
"clientData": [],
"urls": [],
"bio": "",
"addresses": [],
"nicknames": [],
"contactGroupMembership": [
"contactGroups/myContacts"
],
"domainMembership": true
}
let firstName = json.firstName
let emails = json.emails.join("\n")
let relations = json.relations.map(({person, type}) => `${firstName} is a ${type || ''} relation to ${person}`).join("\n")
-%>
my contact's first name is <% firstName %>
emails:
<% emails %>
relations:
<% relations %>
date: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>
<% tp.file.cursor() %>
I tried removing the {{json}} and just setting it to a json object with some dummy data and the same happens. If I render the mocked version with templater directly it works as expected
The text was updated successfully, but these errors were encountered:
@Lacrymology there is a Templater command called Replace templates in active file. You need to run that at the end in order to invoke Templater and get all those bits replaced. So after you end up with the output you pasted above, bring up the command menu, find that command and execute it
I'm just starting with obisidan, so it's perfectly possible that I'm missing something obvious.
When using the example provided at https://ntawileh.github.io/obsidian-google-lookup/person/#using-templater templater doesn't seem to run.
With this template:
I get the following output (some data redacted):
I tried removing the
{{json}}
and just setting it to a json object with some dummy data and the same happens. If I render the mocked version with templater directly it works as expectedThe text was updated successfully, but these errors were encountered: