每个月账单的收入和支出怎么计算

 

array:[

            {

                "tradeTime":[

                    {

                        "amount":-5000,

                        "goodsInfo":"翡翠城租金",

                        "tradeTime":"2019-04-20"

                    },
                                            {

                        "amount":2000,

                        "goodsInfo":"收入",

                        "tradeTime":"2019-04-21"

                    },

                    {

                        "amount":-1200,

                        "goodsInfo":"五联西苑租金",

                        "tradeTime":"2019-04-25"

                    },

                    {

                        "amount":-200,

                        "goodsInfo":"爱与家宾馆",

                        "tradeTime":"2019-04-30"

                    }

                ]

            },

            {

                "tradeTime":[

                    {

                        "amount":-3800,

                        "goodsInfo":"丁香花园",

                        "tradeTime":"2019-05-20"

                    },
                                            {

                        "amount":5000,

                        "goodsInfo":"收入",

                        "tradeTime":"2019-05-22"

                    },

                    {

                        "amount":-2500,

                        "goodsInfo":"滨兴小区",

                        "tradeTime":"2019-05-28"

                    }

                ]

            },

            {

                "tradeTime":[

                    {

                        "amount":-2800,

                        "goodsInfo":"滨苑小区",

                        "tradeTime":"2019-06-08"

                    }

                ]

            }

        ]


qq_浅仓小星_0
浏览 1237回答 1
1回答

pardon110

依据月份,金额分组, 正则提取,多值化一即可。若不想自己写,直接使用第三方库
打开App,查看更多内容
随时随地看视频慕课网APP