Questions tagged [jsonplaceholder]
The jsonplaceholder tag has no usage guidance.
14
questions
0
votes
1answer
14 views
Having trouble appending value from JSON Parsing to array in Swift
I'm playing around with https://jsonplaceholder.typicode.com and I'm trying to create a list of the albums. I tried following the example here, but the list of album titles isn't showing up on the ...
0
votes
1answer
14 views
how to add dynamically multiple posts with jsonplaceholder
help me please, I display the html markup of 6 posts, the first click works correctly, the second click I display the same posts. how should I add six new posts, and so every time I click?
I don't ...
1
vote
1answer
39 views
Sending a post request to jsonplaceholder fails in React Redux
I made a simple React Redux application that fetches a list of posts from jsonplaceholder and within it is a form that allows users to send a POST request. When I send a post request according to ...
0
votes
1answer
100 views
How to fetch records from Json Placeholder, store it in an array and print on screen
I'm using Json placeholder. I want to learn how to fetch records from remote server and use it. Here is my code:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-...
0
votes
0answers
90 views
JSONPLACEHOLDER : How to POST list of dictionaries with unique “id” for each dictionary?
I have the following list of dictionaries:
lst = [{'userId': 123, 'title': 'John', 'body': 'Developer'},
{'userId': 2, 'title': 'James', 'body': 'QA'},
{'userId': 32, 'title': 'Peter', 'body': 'BA'},...
0
votes
2answers
147 views
ruby on rails call external api and show results
I'm trying to call API (to like https://jsonplaceholder.typicode.com/). the idea is simple click the button to show the res but I'm having trouble implementing it. What I have below is just the button ...
0
votes
0answers
50 views
How to get data from multiple arrays using retrofit in java and android studio?
Im using JSONPlaceholder fake API, how can I get information about user ("username", "email" etc.) from users array by only using "userId" field in posts array? User class and Post class only contain ...
0
votes
1answer
52 views
API data not being copied and stored into the state in react, how would I do this?
So I'm new to react and I have this predicament. I'm firstly using axios to get a "database" from JSONPlaceholder which I can then store in the state and then I want to call an API to fill in missing ...
0
votes
1answer
28 views
LoginComponent.html:4 ERROR Error: Cannot find a differ supporting object object Object
I have a trivial problem.Client app is on Angular 8 and the game is that I try to get users from jsonplaceholder api.Its look simple but everythink that I try does not work.My request looks like:
...
0
votes
1answer
43 views
Best way to handle component loading in react
I've an app that gets posts from JSONPlaceholder. It has an initial state of posts: []. It then calls:
this.setState({posts})
If I want to render loading... before the component receives the posts, ...
1
vote
0answers
496 views
Delete data from API(jsonplaceholder) on ReactNative
I’m trying to delete user from jsonplaceholder, because I want to delete item with helping click>
/This is official docs/
Delete a resource
fetch('https://jsonplaceholder.typicode.com/posts/1', {
...
0
votes
2answers
876 views
How to push JSON records into an empty array as individual elements [Angular]
I've recently started working on Angular. I'm creating a filter for my Angular application. The scenario is, I've 100(say) users and their personal details in JSON format. I'm using JSONPlaceholder, ...
0
votes
0answers
14 views
Why I'm getting <prototype> object with every api call
I'm using JSONPlaceholder with Angular. I'm learning these things so my question may not be framed very well. I carefully followed the documentation and I'm getting correct output also. But there is ...
0
votes
4answers
44 views
Angular write data lines dynamically to a table
In my project I getting the data from JSONPlaceholder - Users
I'm new in Angular, so if you find something stupid in the way I get the data please warn me.
dataFromServer;
constructor(private http: ...