Retrieve the item that is contained within a separate item within the original

Is there a way to access the Photos object in my code? I attempted to use {{ item.image.Photos[0].image }} but it was unsuccessful

https://i.stack.imgur.com/IGC2c.png

Looking for Assistance with TypeScript

listHotelPhotos( hotel_id ){
    let loader = this.loadingCtrl.create({ content: 'Loading...' });
    loader.present();
    this.api.hotelPhotos( hotel_id ).subscribe( response => {
      this.hotelImages = response.HotelImages;
      this.Rooms = response.Rooms;
      console.log( response.Rooms );
      loader.dismiss();
    });
  }

Need Help with HTML Integration

<ion-grid class="select-room-types">
        <ion-row *ngFor="let item of Rooms">
            <ion-col width-100><img src="{{ item.image }}" /></ion-col>
            <div class="caption">
                <ion-grid class="select-room-card">
                    <ion-row>
                        <ion-col width-75>{{ item.name }}</ion-col>
                        <ion-col width-25>FJ ${{ item.rate }}</ion-col>
                    </ion-row>
                </ion-grid>
            </div>
        </ion-row>
    </ion-grid>

Answer №1

if the Rooms variable represents the array you shared a picture of, then simply use item.Photos[0].image

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Building an array of ids that contain the checkbox type using jQuery: What's the best way?

Below is the HTML snippet I am working with: <!-- Parent checkbox code goes here --> <input id="ckbCheckAll" class="custom-check ez-hide" type="checkbox" name=""></input> <!-- Child checkbox codes follow --> <input id="practice_ ...

Troubles encountered when loading an Angular JS website using an Android Webview

Greetings everyone! I've been attempting to load GTV onto an Android WebView. It's working perfectly on the mobile browser, but for some reason, it's not loading in the webview. Here is my code snippet: WebView theWebPage = new WebView(t ...

What are some ways in which I can utilize the Ember Handlebars helper?

Similar Question: Using logical operators in a Handlebars.js {{#if}} statement Below is the code snippet provided: {{#each dataArray}} <li>{{#isTrue idVal1 idVal2}} display some text1 {{else}} display some text2 {{/isTrue}} & ...

Using yargs to pass parameters/arguments to a Node script through an npm script

Is it feasible to retrieve a key from yargs when utilizing as an npm script argument? A user inputs in the OSX terminal: npm run scaffold --name=blah which triggers in package.json: "scaffold" : "node ./scaffold/index.js -- " This leads to const yar ...

JS - Reducing in size increases request size

I'm facing an issue with compressing my request - instead of reducing the size, it seems to be increasing it: const requestData = LZString.compress(JSON.stringify({ data: bigBase64StringHere })); await axios.post("api-endpoint", requestData, ...

Enhancing Vue.js Scripts with Laravel Localization Language-Strings

Within my vue.js script, I have successfully implemented a sweetalert using two Laravel localization language strings. Now, I am attempting to utilize the same language strings as data properties in another vue.js component script. The issue arises when t ...

Managing state in React for a nested object while still maintaining the data type of the

Exploring the question further from this particular query Updating State in React for Nested Objects The process of updating nested state involves breaking down the object and reconstructing it as shown below: this.setState({ someProperty: { ...this.stat ...

The challenge of implementing pagination in AngularJS with Spring Data JPA and Spring Data REST

I implemented a factory in my Angularjs application to retrieve invoice details with pagination : .factory('InvoiceDetailsGeneralService', function($http) { return { findByInvoiceId: function(invoice, pageOffset ...

Tips on obtaining outcome by invoking a route outside of app.js

Within my file containing the request methods, the structure appears as follows: article.js router .route("/") .all((req, res) => { console.log("this should happen for any call to the article route"); }) .get((req, res) = ...

Is jQuery.each() failing to function properly in Firefox and Internet Explorer?

Having trouble with the $.each function behaving differently across browsers. I have lists with background images, and I want the parent div to fade in once these images finish loading. My code seems correct as there are no JavaScript errors in the conso ...

The customized uploading button functions seamlessly on desktop devices, yet encounters issues when used on

On my website, I have implemented a custom upload button alongside a hidden file input with the class .invisible-file-input. Here is how it is set up: Javascript $('.call-upload').click(function () { $(this).siblings('.invisible- ...

Make sure to save the HTML content after we make an AJAX call to retrieve it

Is there a way to call an HTML file using Ajax and then save the response as an HTML file in a specific location? I have been trying to make an Ajax call using jQuery, like shown below: $.ajax({ type: "POST", url: "../../../project/html/T ...

Getting the toState parameter using the $transitions service in the latest version of the ui-router

In my project, I am currently utilizing ui-router version 1.0.0-alpha.3. Please note that the older events have been deprecated in this version. As a result, I am in the process of migrating from: $rootScope.$on('$stateChangeStart', (event, toS ...

In JavaScript, the JSON Object only stored the final result from a loop

I am currently working on an HTML Site that features 4 inputRange sliders. My goal is to store all values from these sliders in a nested JSON Object when a user clicks on a button. However, I have encountered an issue where my JavaScript code only saves th ...

What could be causing the issue with my confirmation message not working when I attempt to navigate away from the page?

Why is my confirmation message not triggering when attempting to leave the page? <!DOCTYPE html> <html lang="en-US"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> & ...

Mapping the Way: Innovative Controls for Navigation

Currently, I am utilizing the HERE maps API for JavaScript. However, I would like to customize the design of the map controls similar to this: Below is an example for reference: HERE EXAMPLE Is it feasible to achieve this customization? ...

The project is throwing an error: Unable to locate module './lib/md5-hex' in Ember JS

I attempted the following steps: uninstalling md5-hex using npm with the command: npm uninstall md5-hex --save reinstalling md5-hex using npm with the command: npm install md5-hex --save After performing these actions, I ran ember s but unfortunately, i ...

Angular 4 after ejection, coupled with automated end-to-end testing using Protractor/Selenium setup

I am attempting to conduct end-to-end tests using Protractor/Selenium on an Angular 4 project that has been ejected. Here is my package.json: ... "scripts": { "pree2e": "webdriver-manager update --standalone false --gecko false --quiet node", "e2 ...

saving data in an array using JavaScript

I have a requirement to store values into an array in HTML that are generated by a random number generator in Python as {{player.a1s1}}. I have successfully handled this part. Essentially, every time the button "mm1a" is clicked, a new button will be displ ...

Angular4 and jQuery working together for effective navigation and pagination

Trying to implement pagination in angular 4 and jQuery, but encountering an issue where clicking on the next button causes it to skip through multiple pages at once (2, then 3, then 5)... Component code: addClass(x) { $(".page-item").click(function () ...