# How to Return a Numeric Range from Plugin

**URL:** <https://forum.bubble.io/t/how-to-return-a-numeric-range-from-plugin/230812>\
**Category:** Plugin builders\
**Created:** [November 1, 2022, 9:55pm UTC](https://forum.bubble.io/t/how-to-return-a-numeric-range-from-plugin/230812 "2022-11-01T21:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ladd0393](https://avatars.discourse-cdn.com/v4/letter/l/a9a28c/32.png) [@ladd0393](https://forum.bubble.io/u/ladd0393)\
**Post date:** [November 1, 2022, 9:55pm UTC](https://forum.bubble.io/t/how-to-return-a-numeric-range-from-plugin/230812/1 "2022-11-01T21:55:06Z")

</div>

What is the correct syntax to return a numeric range from a plugin?

I used a field for numeric range and used `typeof properties.range` and found that it is an object. However, when I return an object in `instance.publishState`, I get an error in the console **UnexpectedError Expected a number range, but got an object**.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [November 1, 2022, 11:26pm UTC](https://forum.bubble.io/t/how-to-return-a-numeric-range-from-plugin/230812/2 "2022-11-01T23:26:15Z")

</div>

Bubble numeric ranges are two-element arrays of numbers:

`[start_num, end_num]`

If your exposed state is a list of numeric ranges, that’s a one-dimensional array where each item is also 2-element array:

`[[1,2], [3,4], [5,6], ... ]`
