From 9c0aeb5ace83805d1e525ef7e961c0bbf6eb985b Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 10 Jun 2022 21:24:53 -0300 Subject: [PATCH] bin/json/pull-chapters-data: tweak. --- bin/json/pull-chapters-data | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/json/pull-chapters-data b/bin/json/pull-chapters-data index 4780bef..ebb754d 100755 --- a/bin/json/pull-chapters-data +++ b/bin/json/pull-chapters-data @@ -45,15 +45,15 @@ ar_chapters = request_chapters.call('/ar') ## # Parse chapter data -parsed = en_chapters.map do +parsed = en_chapters.map do |key, chapter| { - id: _1, - place_of_revelation: _2['revelationPlace'], - transliterated_name: _2['transliteratedName'], - translated_name: _2['translatedName'], - verse_count: _2['versesCount'], - slug: _2['slug'], - codepoints: ar_chapters[_1]['translatedName'].codepoints, + id: key, + place_of_revelation: chapter['revelationPlace'], + transliterated_name: chapter['transliteratedName'], + translated_name: chapter['translatedName'], + verse_count: chapter['versesCount'], + slug: chapter['slug'], + codepoints: ar_chapters[key]['translatedName'].codepoints } end