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 6758463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:47:36+00:00 2026-05-26T13:47:36+00:00

I am working on a demo couchapp to output some contact data to a

  • 0

I am working on a demo couchapp to output some contact data to a html-container. Right now, I am doing this by generating the html and appending it via javascript.

In CouchDB I could (I would really like) to be using mustache for generating this more automatically, especially for the later editing this data and storing it to the db again…

The JSON structure for now looks like this:

{
   "_id": "478d86edbbd94bbe627f3ebda300dfb1",
   "_rev": "1-b6b1582f41f38c7a1d3ce43514e97371",
   "accounts": [],
   "activities": [],
   "addresses": [
      {
         "formatted": "B 31\nHeilbronn   74081",
         "streetAddress": "B 31\nHeilbronn   74081",
         "type": "Privat",
         "home": false,
         "primary": false,
         "work": false
      },
      {
         "formatted": "Strasse \nHeilbronn   74081",
         "streetAddress": "Strasse\nHeilbronn   74081",
         "type": "Work",
         "home": false,
         "primary": false,
         "work": false
      }
   ],
   "books": [],
   "cars": [],
   "contactID": 46,
   "date_created": "2011-02-07T19:42:07.813+01:00",
   "date_modified": "2011-02-07T19:42:07.813+01:00",
   "displayName": "Adac Adac",
   "emails": [],
   "foods": [],
   "heroes": []
}

My questions are:

  1. How do I adress to the sub objects, e.g. for “addresses” in mustache? Like this?

    {{#addresses}}

    formatted: {{formatted}}
    streetAddress: {{streetAddress}}
    …

    {{/addresses}}

  2. Would this be a good and reusable approach to also edit this data? How would this be done in CouchApps?

  • 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-05-26T13:47:36+00:00Added an answer on May 26, 2026 at 1:47 pm

    As for question 1, you may also use partials:

    {{#addresses}}
        {{>address}}
    {{/addresses}}
    

    where address will be a html containing the same what you’ve put in your example, and assigned in your evently statements:

    partials: [ /* ... */ ],
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working through the Demo: Binding Data with the SqlDataSource of this pluralsight video
I'm working on a demo about collision detection. (Some of the code for this
I'm working on a simple demo project so that I can learn some things
working on a site for a client (demo page here, still under construction: http://www.wmaxwell.com/newsite.html
Working Demo: http://jsbin.com/opokev/54 I'm working on having this image as the background image and
I've been doing some reading about appending a div to other objects. What I
I was working on a demo method and found something strange(at least to me
I'm working with a demo of two sortable jquery lists... but have a problem
Working on a carousel lightbox tooltip demo and as far I can see in
I am using Slidesjs it working fine in below url http://www.mysoko.in/demo/Simple/ And same code

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.