Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

242
Views
cómo mostrar datos json por fecha en reaccionar nativo

tengo datos json por fechas que quiero mostrar el tiempo de programación para hoy. ¿Cómo se puede implementar esto? dirección del archivo json https://volnaveri.by/tt.json

reaccionar código nativo

 import React, { Component } from 'react'; import { ActivityIndicator, FlatList, Text, View } from 'react-native'; export default class App extends Component { constructor(props) { super(props); this.state = { data: [], isLoading: true }; } async getMovies() { try { const response = await fetch('https://volnaveri.by/tt.json'); const json = await response.json(); this.setState({ data: json.times }); } catch (error) { console.log(error); } finally { this.setState({ isLoading: false }); } } componentDidMount() { this.getMovies(); } render() { const { data, isLoading } = this.state; return ( <View style={{ flex: 1, padding: 24 }}> {isLoading ? <ActivityIndicator/> : ( <FlatList data={data} keyExtractor={({ id }, index) => id} renderItem={({ item }) => ( <Text>{item.Date}, {item.Monday}, {item.Tuesday}, {item.Monday}, {item.Wednesday}, {item.Thursday}</Text> )} /> )} </View> ); } };

hasta ahora esto es lo que tengo. foto

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

En lugar de this.setState({datos: json.times});

Que hacer:

this.setState({ datos: [data.times.find(time => time.Date.split('-')[2] === new Date().getDate()))]

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!