Holy Bible

무료
분류별 Ajith Joseph | 업데이트됨 13日前 | Data
인기

9.5 / 10

지연 시간

784ms

서비스 수준

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.

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입