Holy Bible

БЕСПЛАТНО
От Ajith Joseph | Обновлено לפני 9 ימים | Data
Популярность

9.5 / 10

Задержка

769ms

Уровень обслуживания

89%

Health Check

N/A

Назад ко всем обсуждениям

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.

Присоединяйтесь к обсуждению – добавьте комментарий ниже:

Войдите / Зарегистрируйтесь, чтобы публиковать новые комментарии