# manipulating array data returned by 'blog\_recent\_posts'

**URL:** <https://community.hubspot.com/t/manipulating-array-data-returned-by-blog-recent-posts/28969>\
**Category:** CMS Development\
**Created:** [December 9, 2020, 6:41pm UTC](https://community.hubspot.com/t/manipulating-array-data-returned-by-blog-recent-posts/28969 "2020-12-09T18:41:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bengoshow](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bengoshow/32/54603_2.png) [@bengoshow](https://community.hubspot.com/u/bengoshow)\
**Post date:** [December 9, 2020, 6:41pm UTC](https://community.hubspot.com/t/manipulating-array-data-returned-by-blog-recent-posts/28969/1 "2020-12-09T18:41:59Z")

</div>

I’m using `blog_recent_posts` but need to break up the data returned for display in different parts of the page. How can I use the Hubl `pop` function to remove the first element of the returned list of posts? Right now it removes the entire object.

The goal is to show 9 unique items “below the fold”, instead of repeating ones already displayed above.

---

<div class="post-metadata">

**Author:** ![piersg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/piersg/32/99782_2.png) [@piersg](https://community.hubspot.com/u/piersg)\
**Post date:** [December 10, 2020, 1:54pm UTC](https://community.hubspot.com/t/manipulating-array-data-returned-by-blog-recent-posts/28969/2 "2020-12-10T13:54:52Z")

</div>

You could loop twice, the first time returning only the first item, the second time returning all but the first. Either {% unless loop.first %} for everything but the first item or {% loop.index \> 1 and loop.index \<= 10 %} for the next 9 after the first.

```lia-code-sample
{% set rec_posts = blog_recent_posts('default') %}
{% for rec_post in rec_posts %}
 {% if loop.first %}
 <div class="post-title">{{ rec_post.name }}</div>
 {% endif %}
{% endfor %}
 ...
{% for rec_post in rec_posts %}
 {% if loop.index > 1 and loop.index <= 10 %} // to return 9 posts but not the the first
 <div class="post-title">{{ rec_post.name }}</div>
 {% endif %}
{% endfor %}

```
