# Parsing an object as a Vector of parentmodule

**URL:** <https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 29, 2022, 9:25am UTC](https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511 "2022-06-29T09:25:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ga72kud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ga72kud/32/32180_2.png) [@ga72kud](https://discourse.julialang.org/u/ga72kud)\
**Post date:** [June 29, 2022, 9:25am UTC](https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511/1 "2022-06-29T09:25:56Z")

</div>

I hope this question finds you well, and I hope I can explain the question adequately. I write a program where I pass a vector of objects (mutable struct) from one module to a submodule (child module). So I call a function from a submodule, but the object comes from a module with include(…). In the submodule and the parent module, I make the object known.

in the function of the submodule, I use the function  
include(“xxx/yyy/callmodule\_to\_get\_object.jl)”  
function foo( Vector{Any})

in the parent module it is something like this:  
include(“xxx/callmodule\_to\_get\_object.jl)”  
newVec=Vector{Any}()

It works for me if I use Any as the datatype for the vector, but I want to have it clean so I can get the right type of object.

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [June 29, 2022, 9:43am UTC](https://discourse.julialang.org/t/parsing-an-object-as-a-vector-of-parentmodule/83511/2 "2022-06-29T09:43:08Z")

</div>

You’ll need to refactor your code so you only call `include` once.
