Holy Bible

免费
通过 Ajith Joseph | 已更新 15 days ago | Data
人气

9.5 / 10

延迟

812ms

服务等级

88%

Health Check

N/A

返回所有讨论

How to parse it.

Rapid account: Mikolertesx
Mikolertesx
3 years ago
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.

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论