# Passing data to modeling toolkit from a frontend

**URL:** https://discourse.julialang.org/t/passing-data-to-modeling-toolkit-from-a-frontend/65013
**Category:** Modelling & Simulations
**Created:** [July 21, 2021, 4:14am UTC](https://discourse.julialang.org/t/passing-data-to-modeling-toolkit-from-a-frontend/65013 "2021-07-21T04:14:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![juliascrub](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@juliascrub](https://discourse.julialang.org/u/juliascrub)
#### Post date: [July 21, 2021, 4:14am UTC](https://discourse.julialang.org/t/passing-data-to-modeling-toolkit-from-a-frontend/65013/1 "2021-07-21T04:14:25Z")

</div>

I am working on a little frontend for my modeling toolkit based project.

let’s say I have a model my\_model. It has 3 parameters a,b, and c. I can call `string.(parameters(my_model))` and get a list of the parameter names, pass that to the frontend saying hey, the model needs values for parameters a,b, and c, let the user supply values a\_val, b\_val, and c\_val, and then pass those back to julia.

My question is now how can I get those user provided values into the parameter map that gets provided to the ODEProblem constructor [a =\> a\_val, b =\> b\_val, c =\> c\_val]. Id like to do this in a general way for any model. Whats throwing me off is how to build that array of pairs.

ive tried doing something like:

```julia
ps = []
for p in parameters(my_model)
    append!(ps, Pair(p, val))
end

```

but it gives me a vector{Any} when I expected a vector of pairs

Edit: Ah! Its push! that I wanted not append!, push gives me the expected vector of pairs. I think that should work then. Will have to test that out tomorrow
