Search code examples
showtrello

How To get only open board in trello (not closed board)


I want to show in my board page only open board in my trello

 jQuery.ajax({
                    url: allboardsurl,
                    method: 'post',
                    data: {id: id},
                    dataType: "json",
                    async: false,
                    success: function (data) {

                    },
                    error: function () {
                        console.log("The request failed");
                    }
                });

Solution

  • if your all data come in Data then you can check the condition

    if your result in ajax success

    success: function (data) {
                            response = JSON.parse(data);
                             for (var i = 0; i < response.length; i++) {
                                    if (!response[i].closed) {
                                   console.log(response[i].name);
                                }
    
                            }
                        },