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.

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें