I have a 2D array which looks like below
[['2018-05-15', 6.7580658761256265], ['2018-05-16', 7.413963464926804], ['2018-05-17', 8.801776892107043], ['2018-05-18', 10.292505686766823], ['2018-05-19', 10.292505686766823], ['2018-05-20', 10.292505686766823], ['2018-05-21', 10.292505686766823]]
I want to store this 2D array in postgres.I checked postgres's documentation https://www.postgresql.org/docs/9.1/static/arrays.html and found the below example
CREATE TABLE sal_emp (
name text,
pay_by_quarter integer[],
schedule text[][]
);
INSERT INTO sal_emp
VALUES ('Bill',
ARRAY[10000, 10000, 10000, 10000],
ARRAY[['meeting', 'lunch'], ['training', 'presentation']]);
For a list that contains both of its values as string ['meeting', 'lunch']
, we use text[][]
But as you can see, I have one string and one float as a content of a list
['2018-05-15', 6.7580658761256265]
Then what do I set the column type as?