1

Facing an Weird Issue in Vuejs.. I am using firestore to get data using props as id for the singlepost... Now array formed is fine.. as you can see in the screenshot... there is no error in the console, i am seeing data... but its not working for its child key element.. attaching another screenshot of code.i guess if {{temple}} is working then {{temple.templename}} should work fine also

<div class="appCapsule">
{{temple}}
         <div class="section mt-2">
            <div class="card text-center">
                <div class="card-header">
                    {{temple.templename}}
                </div>
                <div class="card-body">
                    <img v-bind:src="'https://awesong.in/jain/storage/temples/' + temple.fileToUpload1" style="width:100%">

                    <p class="card-text">Temple Type : {{temple.templetype}}</p>
                    <p class="card-text">Near By City : {{temple.nearbycity}}</p>
                    <p class="card-text">Built in : {{temple.built}}</p>
                    <p class="card-text">Address : {{temple.address}}</p>
                    <p class="card-text">Location : {{temple.location}}</p>
                    <p class="card-text">District : {{temple.district}}</p>
                    <p class="card-text">State : {{temple.state}}</p>
                    <p class="card-text">Phone : {{temple.phone}}</p>
                    <p class="card-text">Email : {{temple.email}}</p>
                    <p class="card-text">Website : {{temple.website}}</p>
                    <p class="card-text">Views : {{temple.clicks}}</p>


                </div>

            </div>
        </div>


    </div>

Image attached for reference

1 Answer 1

1

Temple is an array of JSON objects. You could use temple[0].property, or you could loop over it:

<div v-for="t in temple" :key="JSON.stringify(t)">
     {{t.templename}} // etc
</div>
Sign up to request clarification or add additional context in comments.

2 Comments

how can i get single object, so that i don't need to run loop
@user3323829 temple[0].templename.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.