# How to convert CartesianIndex{N} values to Int64

**URL:** https://discourse.julialang.org/t/how-to-convert-cartesianindex-n-values-to-int64/15074
**Category:** General Usage
**Tags:** question
**Created:** [September 17, 2018, 3:54pm UTC](https://discourse.julialang.org/t/how-to-convert-cartesianindex-n-values-to-int64/15074 "2018-09-17T15:54:47Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [September 18, 2018, 10:13am UTC](https://discourse.julialang.org/t/how-to-convert-cartesianindex-n-values-to-int64/15074/6 "2018-09-18T10:13:07Z")

</div>

> [@Tomoyuki\_Kosaka](#):
>
> I hope to extract “2” from CartesianIndex(1,2).  
> How can I do it?

Just extract it with normal indexing?

```julia
julia> CartesianIndex(1,20)[2]
20

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-convert-cartesianindex-n-values-to-int64/15074)._
