Holy Bible

GRATUITO
Por Ajith Joseph | Atualizado 5 दिन पहले | Data
Popularidade

9.5 / 10

Latência

497ms

Nível de serviço

92%

Health Check

N/A

Voltar para todas as discussões

How to parse it.

Rapid account: Mikolertesx
Mikolertesx
3 वर्ष पहले
const verses = response.Output.replace(/<\w+>/g, '')
      .split(/\d+/)
      .filter((verse) => verse.trim() !== '')
      .map((verse, index) => {
        return { number: index + 1, text: verse.trim() }
      })

To parse it, you can use this code, it’s a regular expression that first, deletes the HTML characters that are in between, then splits it everytime it finds a new verse.

Hope it’s useful to anyone else! 😄

This doesn’t parse the titles in between, but it gives you every verse in it.

Junte-se à discussão - adicione o comentário abaixo:

Efetue login / inscreva-se para postar novos comentários