Skip to content

Json array result isn't mapped from $http using "tns-core-modules": "^1.6.0" #78

Closed
@matt4446

Description

@matt4446

Should this be a new issue? I'm not sure how visible the closed issues are ... It is the same problem as the last one.

I can still see the result as a string, but the ".Json()" command is still an object that is not an array.

previous issue 41

response
            .map(response => response.json())
            .subscribe((items : Array<IProvider>) => {
                this.list = items; //<- items is a object ?

                // items.forEach((item) => {  
                //     this.logger.Notify("item");
                //     this.logger.Notify(item.Name);
                // });

                 this.logger.Notify("items available:" + items.length);
            },(error) => {
                this.logger.Error("Could not map items");
                this.logger.Error(error);
            });

Thanks, Matt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions