All Questions
121
questions
0
votes
1
answer
38
views
Find corresponding product combination according to user's selection
This corresponds to an ecommerce site.
I have the following JSON corresponding to a list of combinations (sizes, colors, etc) valid for a certain product:
[
{
"id": 7,
"price&...
0
votes
1
answer
154
views
How to get Icon value that is not a URL from JSON object in Ionic 3
I am trying to retrieve an icon from a JSON object using Ionic 3 and weather.org API.
The JSON structure is below:
The JSON object is retuned as expected and all other fields are accessible. When I ...
0
votes
2
answers
38
views
How to save each json value into localStorage in ionic
I have the follows json from my rest api:
{"data":[{
"loginStatus":"Valid",
"CustomerName":"Fagbemi Ayodele","Mobile":null,
"Email":"[email protected]",
"CustomerID":"3"
}]}
In my login.ts ...
1
vote
1
answer
338
views
How to Parse a Json Data Response from an API call in Ionic v3 and store in localStorage
I want to access array data and store in localStorage.
I made an API call and get a response as below, shown on console
My Api Provider:
import { Injectable } from '@angular/core';
import { Http, ...
0
votes
0
answers
33
views
Ionic 3: Error: Cannot find a differ supporting object '[{"EmpMenage_Nom":" Joumaa","EmpMenage_Prenom":"Michoto"}]'
I'm trying to get user information from web API as JSON, I know this is not an array and that ngfor can't read string but I don't know how to convert it to JSON!!
my provider:
getUsers() {
return ...
-1
votes
1
answer
68
views
Unexpected token o in JSON at position 1 in ionic 3
I am working on ionic 3 app. when i run it on browser its working fine but when i run as a apk or on mobile it gives me error ‘Unexpected token o in JSON at position 1’ as shown in screenshot https://...
-1
votes
3
answers
97
views
How to calculate and display sum of field from javascript object
I have an object, where I need to display name. and the total expense amount of respective person.
I am able to display name by using ngfor.
But how to display the sum of respective amount. Like ...
-1
votes
2
answers
138
views
How to add values from multiple JSON object and store the value in another JSON object in Angular 6
I have two different JSON object. One object is empList and other one is holidayList.
I want to add hours from each JSON object.Andthe sum of hours should be pushed to sumHoursList JSON object.I am ...
1
vote
1
answer
170
views
Fetch data from comma separated string from JSON response and disable or enable button based on value in IONIC 3
I have a JSON response where for one parameter I have comma separated string like below
this.dataList = [{
"id":1,
"name": "Ram",
"total_slots": 3,
"alloted_slot":"a1,a2,...
0
votes
0
answers
330
views
Unexpected token < in JSON at position -core.js:1449
I'm having trouble in this JSON.
> ERROR SyntaxError: Unexpected token < in JSON at position 0 core.js:1449
> at JSON.parse (<anonymous>)
> at Response.Body.json (http.js:...
0
votes
1
answer
183
views
How can we get playstore app version in ionic 3 application?
I have tried so many solutions from google, but no any luck, I didn't get proper solution. How can i get app version from Playstore?
0
votes
1
answer
21
views
Why it is Undefined? How can i solve it?
when i am trying to get this console.log(this.empresas[0]); it says it is undefined, but empresas is loaded in the function.
empresas: any;
constructor(...) {
this.getEmpresas();
console.log(...
0
votes
0
answers
31
views
searchbar filter ionic v3 with json
I am trying to make a search bar in ionic v3 with JSON data. The JSON works fine.
But when I try to get some values it gets undefined (make a promise).
This line "console.log(this.empresas[0]....
2
votes
2
answers
126
views
How to sort json objects using the order of another json
I have a list of parks (park_list) that can be sorted by distance and by area.
I already succeeded in sorting by distance using the code below:
sortList(index){
return function(a, b){
return (...
0
votes
1
answer
57
views
How to store a array element in local storage
I'm new to ionic 3. i need to store a array element in local storage.
I tried this code but it only storing the array. Not an array element
This is my code:
signin() {
this.showLoader();
...